#include<bits/stdc++.h>
using namespace std;
const int N=109;
char ans[N][N];
string s;
int main(){
    freopen("snake.in","r",stdin);
    freopen("snake.out","w",stdout);
    cin>>s;
    for(int i=1;i<=100;i++)
        for(int j=1;j<=100;j++){
            int x;
            if(i%2==0)x=i*100-j+1;
            else x=(i-1)*100+j;
            if(x>s.size())ans[i][j]='R';
            else ans[i][j]=s[x-1];
        }
    cout<<100<<" "<<100<<endl;
    for(int i=1;i<=100;i++,cout<<endl)
        for(int j=1;j<=100;j++)
            cout<<ans[i][j];
    cout<<1<<" "<<1<<endl;
    int i=1,j=1;
    for(int k=1;k<=s.size()-1;k++){
        if(i%2==1&&j<100)
            cout<<"R",j++;
        else if(i%2==1&&j==100)
            cout<<"D",i++;
        else if(i%2==0&&j>1)
            cout<<"L",j--;
        else cout<<"D",i++;
    }
    return 0;
}